<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
  	<meta charset="UTF-8">
  	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  	<title>常见问题win</title>
  	<link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  	<link rel="stylesheet" type="text/css" href="../../css/common.css">
</head>
<body id="wrap">
    <header class="aui-bar aui-bar-nav aui-bar-light sg-color-font1" id="aui-header">
        <a class="aui-pull-left"  tapmode onclick="closeWinFun()">
            <span class="aui-iconfont aui-icon-left sg-text-size36 sg-color-font1"></span>
        </a>
        <div class="aui-title sg-text-size36">常见问题</div>
    </header>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript">
(function (doc, win) {
  	var docEl = doc.documentElement,
  	resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
  	recalc = function () {
    		var clientWidth = docEl.clientWidth;
    		if (!clientWidth) return;
    		docEl.style.setProperty('font-size',(clientWidth / 10) + 'px','important');
  	};
  	if(!doc.addEventListener){
        return
    };
  	win.addEventListener(resizeEvt, recalc, false);
  	doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
apiready = function () {
		//解析元素 tapmode 属性，优化点击事件处理 - 第四步
		api.parseTapmode();
    var header = $api.byId('aui-header');
		$api.fixStatusBar(header);
    document.querySelector('.aui-title').innerText = api.pageParam.typeName || '热门问题';
    // 打开当前对应frm页面
    openFrameFun();
}
//打开当前商品对应的frm页面
function openFrameFun(){
    api.openFrame({
        name: 'commonProblemList',
        url: './commonProblemList_frm.html',
        rect: {
            x: 0,
            y: $api.dom('#aui-header').offsetHeight,
    				w: 'auto',
    				h: $api.dom('#wrap').offsetHeight - $api.dom('#aui-header').offsetHeight
        },
        pageParam: {
            typeId: api.pageParam.typeId,
            questionName:api.pageParam.questionName,
        },
        bounces: true,
        bgColor: 'rgba(0,0,0,0)',
    });
}

// 关闭当前页面
function closeWinFun(){
    api.closeWin({});
}
</script>
</html>
